From: Chong Yidong Date: Tue, 28 Apr 2009 21:29:47 +0000 (+0000) Subject: * progmodes/which-func.el (which-function): Don't assume that X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~718 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0dbf4e35129cb06e31f60f8eb3445485360ba4a2;p=emacs.git * progmodes/which-func.el (which-function): Don't assume that entries from `imenu--index-alist' are ordered by buffer position, which fails when submenus are present (Bug#3153). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37624c22abb..6d259582c65 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-04-28 Geert Kloosterman (tiny change) + + * progmodes/which-func.el (which-function): Don't assume that + entries from `imenu--index-alist' are ordered by buffer position, + which fails when submenus are present (Bug#3153). + 2009-04-28 Stefan Monnier * international/quail.el (quail-vunion): Remove unexplained nreverse. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index ee392e2734a..3e06bf762a8 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -310,11 +310,8 @@ If no function name is found, return nil." (setq minoffset offset name (funcall which-func-imenu-joiner-function - (reverse (cons (car pair) namestack))))) - ;; Entries in order, so can skip all those after point. - (setq alist nil - imstack nil))))) - + (reverse (cons (car pair) + namestack))))))))) (setq alist (car imstack) namestack (cdr namestack) imstack (cdr imstack))))))